<?php 
require('include/book.php');
require('include/authority.php');
if(!Authority::is_login())
  {
    die('FAIL');
  }
$ID = $_GET['ID'];
if(!isset($ID))
  {
    die('FAIL');
  }
$book = Book::get_book_by_ID($ID);
if(!$book)
  {
    die('FAIL');
  }
echo JSON_encode($book);
?>